Heretofore, photoelectric encoders have used a reference position-detecting device in which an identical random pattern is formed on both a main scale and an index scale. The alignment of one pattern with the other is sensed by an optical means, and the resulting electrical signal is used to indicate a reference position. Since the electrical signal produced in this way takes the form of pulses having a given duration, the reference position is represented by the given pulse duration. Hence, it has not been possible to accurately determine positions.
The above problem is now discussed by referring to FIG. 5. When a signal 101 obtained by sensing a reference position is converted into a pulse 103 using a constant-level signal 102, the pulse 103 has a duration of T. To shorten this duration T, the level of the signal 102 may be increased. However, if the signal 102 is elevated to a too large level, the pulse 103 may not be produced correctly because of variations of the signal 101 which are caused by changes in the light quantity or generation of noise. Thus, the signal 102 is set to a certain level which is not affected by variations of the signal 101. Consequently, the pulse 103 is basically given the pulse duration T. When the index scale is moved to the right relative to the main scale, a signal 104 which indicates the reference position is obtained. When the index scale is shifted to the left relative to the main scale, a signal 105 indicative of the reference position is derived. These signals 104 and 105 involve a time error which depends on the direction and corresponds to the pulse duration T.
If this pulse duration T is within the pulse separation between the successive pulses (referred to as "count pulses" herein) which are derived from a sinusoidal signal generated by the relative movement between the main and index scales, then the count pulse produced during the duration of the pulse 103 is only one. Accordingly, no practical problems will occur whether the index scale moves to the left or to the right. However, when an additional pulse is interpolated between two successive count pulses to increase the response rate of each processing circuit or to enhance the resolution of the encoder, the allowable range for the pulse duration T is quite narrow. Therefore, in case where the optically detected lattices for detection of a reference position have not been machined accurately, it is not expected that the reference position is detected accurately.